package com.lam.mall.entity;

import com.lam.common.validate.group.Add;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import com.alibaba.excel.annotation.ExcelProperty;
import com.lam.common.validate.annotation.DictCheck;
import com.lam.common.utils.DateUtil;
import com.lam.common.validate.annotation.DictValid;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;
import com.lam.common.components.dict.annotation.Dict;
import com.baomidou.mybatisplus.annotation.TableField;
import javax.validation.constraints.Null;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lam.common.components.easyexcel.converter.DictConverter;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lam.common.base.domain.BaseEntity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.FieldFill;

/**
 * 热搜管理对象 mall_hot_search
 * 
 * @author admin
 * @date 2023-04-20
 */
@DictCheck
@ColumnWidth(30)
@TableName("mall_hot_search")
public class HotSearch implements BaseEntity{

    /** 主键 */
    @ExcelProperty("序号")
    @Null(groups = Add.class, message="id必须为空")
    @TableId(type = IdType.AUTO)
    private String id;
    
    /** 店铺ID, 0为全局热搜 */
    @ExcelIgnore
    private String shopId;

    /** 标题 */
    @ExcelProperty("热搜标题")
    @NotBlank(message = "热搜标题不能为空")
    @Size(max = 255, message = "热搜标题长度不能超过255个字符")
    private String title;

    /** 内容 */
    @ExcelProperty("内容")
    @NotBlank(message = "内容不能为空")
    @Size(max = 255, message = "内容长度不能超过255个字符")
    private String content;

    /** 排序 */
    @ExcelProperty("排序")
    private BigDecimal sortNo;

    /** 状态(0-不可用, 1-可用) */
    @ExcelProperty(value = "状态", converter = DictConverter.class)
    @NotNull(message = "状态不能为空")
    @DictValid(message = "无效的状态")
    @Dict(dictCode = "status_type")
    private Integer status;

    /** 创建人 */
    @ExcelProperty("创建人")
    private String createBy;

    /** 创建时间 */
    @ExcelProperty("创建时间")
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /** 更新人 */
    @ExcelProperty("更新人")
    private String updateBy;

    /** 更新时间 */
    @ExcelProperty("更新时间")
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    } 

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public String getShopId() {
        return shopId;
    }    
    
    public void setTitle(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }    
    
    public void setContent(String content) {
        this.content = content;
    }

    public String getContent() {
        return content;
    }    
    
    public void setSortNo(BigDecimal sortNo) {
        this.sortNo = sortNo;
    }

    public BigDecimal getSortNo() {
        return sortNo;
    }    
    
    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }    
    
    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getCreateBy() {
        return createBy;
    }    
    
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }    
    
    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public String getUpdateBy() {
        return updateBy;
    }    
    
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }    
    

}
